/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proyecto.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author sistemas
 */
@Entity
@Table(name = "pedidodespacho")
@NamedQueries({
    @NamedQuery(name = "Pedidodespacho.findAll", query = "SELECT p FROM Pedidodespacho p"),
    @NamedQuery(name = "Pedidodespacho.findByNroDespacho", query = "SELECT p FROM Pedidodespacho p WHERE p.nroDespacho = :nroDespacho"),
    @NamedQuery(name = "Pedidodespacho.findByPEDIDOnroPedido", query = "SELECT p FROM Pedidodespacho p WHERE p.pEDIDOnroPedido = :pEDIDOnroPedido"),
    @NamedQuery(name = "Pedidodespacho.findByTRANSPORTISTAcodTransportista", query = "SELECT p FROM Pedidodespacho p WHERE p.tRANSPORTISTAcodTransportista = :tRANSPORTISTAcodTransportista"),
    @NamedQuery(name = "Pedidodespacho.findByFecDespacho", query = "SELECT p FROM Pedidodespacho p WHERE p.fecDespacho = :fecDespacho"),
    @NamedQuery(name = "Pedidodespacho.findByHoraSalida", query = "SELECT p FROM Pedidodespacho p WHERE p.horaSalida = :horaSalida"),
    @NamedQuery(name = "Pedidodespacho.findByHoraEntrega", query = "SELECT p FROM Pedidodespacho p WHERE p.horaEntrega = :horaEntrega"),
    @NamedQuery(name = "Pedidodespacho.findByDspUsract", query = "SELECT p FROM Pedidodespacho p WHERE p.dspUsract = :dspUsract"),
    @NamedQuery(name = "Pedidodespacho.findByDspFecact", query = "SELECT p FROM Pedidodespacho p WHERE p.dspFecact = :dspFecact")})
public class Pedidodespacho implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "nroDespacho")
    private Integer nroDespacho;
    @Basic(optional = false)
    @Column(name = "PEDIDO_nroPedido")
    private int pEDIDOnroPedido;
    @Basic(optional = false)
    @Column(name = "TRANSPORTISTA_codTransportista")
    private int tRANSPORTISTAcodTransportista;
    @Column(name = "fecDespacho")
    @Temporal(TemporalType.DATE)
    private Date fecDespacho;
    @Column(name = "horaSalida")
    @Temporal(TemporalType.TIME)
    private Date horaSalida;
    @Column(name = "horaEntrega")
    @Temporal(TemporalType.TIME)
    private Date horaEntrega;
    @Column(name = "dsp_usract")
    private String dspUsract;
    @Column(name = "dsp_fecact")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dspFecact;

    public Pedidodespacho() {
    }

    public Pedidodespacho(Integer nroDespacho) {
        this.nroDespacho = nroDespacho;
    }

    public Pedidodespacho(Integer nroDespacho, int pEDIDOnroPedido, int tRANSPORTISTAcodTransportista) {
        this.nroDespacho = nroDespacho;
        this.pEDIDOnroPedido = pEDIDOnroPedido;
        this.tRANSPORTISTAcodTransportista = tRANSPORTISTAcodTransportista;
    }

    public Integer getNroDespacho() {
        return nroDespacho;
    }

    public void setNroDespacho(Integer nroDespacho) {
        this.nroDespacho = nroDespacho;
    }

    public int getPEDIDOnroPedido() {
        return pEDIDOnroPedido;
    }

    public void setPEDIDOnroPedido(int pEDIDOnroPedido) {
        this.pEDIDOnroPedido = pEDIDOnroPedido;
    }

    public int getTRANSPORTISTAcodTransportista() {
        return tRANSPORTISTAcodTransportista;
    }

    public void setTRANSPORTISTAcodTransportista(int tRANSPORTISTAcodTransportista) {
        this.tRANSPORTISTAcodTransportista = tRANSPORTISTAcodTransportista;
    }

    public Date getFecDespacho() {
        return fecDespacho;
    }

    public void setFecDespacho(Date fecDespacho) {
        this.fecDespacho = fecDespacho;
    }

    public Date getHoraSalida() {
        return horaSalida;
    }

    public void setHoraSalida(Date horaSalida) {
        this.horaSalida = horaSalida;
    }

    public Date getHoraEntrega() {
        return horaEntrega;
    }

    public void setHoraEntrega(Date horaEntrega) {
        this.horaEntrega = horaEntrega;
    }

    public String getDspUsract() {
        return dspUsract;
    }

    public void setDspUsract(String dspUsract) {
        this.dspUsract = dspUsract;
    }

    public Date getDspFecact() {
        return dspFecact;
    }

    public void setDspFecact(Date dspFecact) {
        this.dspFecact = dspFecact;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nroDespacho != null ? nroDespacho.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pedidodespacho)) {
            return false;
        }
        Pedidodespacho other = (Pedidodespacho) object;
        if ((this.nroDespacho == null && other.nroDespacho != null) || (this.nroDespacho != null && !this.nroDespacho.equals(other.nroDespacho))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "proyecto.modelo.Pedidodespacho[nroDespacho=" + nroDespacho + "]";
    }

}
